<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

<#include "../../common/header.html">

<script src="${resurcePath}/cloudpay/js/uploadPreview/uploadPreview.min.js"></script>
</head>
<body class="hold-transition skin-purple-light sidebar-mini">
	<div class="wrapper">

		<!-- 	顶部和左侧菜单的jsp s -->
		<#include "../../common/menu.html">
		<!-- 	顶部和左侧菜单的jsp e -->

		<!-- Content Wrapper. Contains page content -->
		<div class="content-wrapper">
			<!-- Content Header (Page header) -->
			<section class="content-header">
				<h1>编辑摄像头</h1>
			</section>

			<!-- Main content -->
			<section class="content" style="padding-bottom: 0px;" id="content">
				<!-- general form elements -->
				<div class="box box-primary" style="width: 1000px; margin: 0 auto;">
					<div class="box-header with-border">
						<h3 class="box-title">摄像头</h3>
					</div>
					<!-- /.box-header -->
					<!-- form start -->
					<form action="/traffic/detector/editDetector" method="post" id="roleForm"  enctype="multipart/form-data">
                        <input type="hidden" class="form-control" id="trafficDetectorId" name="trafficDetectorId" value="${Request.trafficDetector.trafficDetectorId!}"/>
                        <div class="box-body">

                        <div class="form-group">
                            <label for="name">名称</label>
                            <input type="text" class="form-control" id="name" name="name" value='${Request.trafficDetector.name!}'/>
                        </div>

                        <div class="form-group">
                            <label for="description">描述</label>
                            <input type="text" class="form-control" id="description" name="description" value='${Request.trafficDetector.description!}'/>
                        </div>

                        <div class="form-group">
                            <label for="address">地址</label>
                            <input type="text" class="form-control" id="address" name="address" value='${Request.trafficDetector.address!}'/>
                        </div>

                        <div class="form-group">
                            <label for="verifyCode">验证码</label>
                            <input type="text" class="form-control" id="verifyCode" name="verifyCode" value='${Request.trafficDetector.verifyCode!}'/>
                        </div>

                        <div class="form-group">
                            <label for="deviceSerial">序列号</label>
                            <input type="text" class="form-control" id="deviceSerial" name="deviceSerial" value='${Request.trafficDetector.deviceSerial!}'/>
                        </div>

                        <div class="form-group">
                            <label for="screenShotInput">封面图</label>
                            <img <#if Request.trafficDetector.screenShot??> src="${Request.trafficDetector.screenShot!}"</#if> id="img_picture" style="width:160px;height:100px;"/>
                            <input type="file" class="form-control" id="screenShotInput" name="screenShotInput"  />
                        </div>

                        <div class="form-group">
                            <label for="videoRtmpUrlSmooth">流畅RTMP播放地址</label>
                            <input type="text" class="form-control" id="videoRtmpUrlSmooth" name="videoRtmpUrlSmooth" value='${Request.trafficDetector.videoRtmpUrlSmooth!}'/>
                        </div>

                        <div class="form-group">
                            <label for="videoRtmpUrlHd">高清RTMP播放地址</label>
                            <input type="text" class="form-control" id="videoRtmpUrlHd" name="videoRtmpUrlHd" value='${Request.trafficDetector.videoRtmpUrlHd!}'/>
                        </div>

                        <div class="form-group">
                            <label for="videoUrlSmooth">流畅播放地址</label>
                            <input type="text" class="form-control" id="videoUrlSmooth" name="videoUrlSmooth" value='${Request.trafficDetector.videoUrlSmooth!}'/>
                        </div>

                        <div class="form-group">
                            <label for="videoUrlHd">高清播放地址</label>
                            <input type="text" class="form-control" id="videoUrlHd" name="videoUrlHd" value='${Request.trafficDetector.videoUrlHd!}'/>
                        </div>
						<!-- /.box-body  @click="submit"-->
						<div class="box-footer">
							<button type="submit" class="btn btn-primary">提交</button>
							<button type="reset" class="btn btn-primary" >清空</button>
						</div>
					</form>
				</div>
				<!-- /.box -->
			</section>
			<!-- /.content -->
		</div>

	</div>
	<!-- ./wrapper -->
</body>
<script>
$(function() {
	//校验器
	var formValidator = $("#roleForm").validate({
				onkeyup : false,
				focusInvalid : false,  //错误时,错误选项不会得到焦点
				focusCleanup : true,   //得到焦点时，清空错误提示信息
				rules : {},
				messages : {}
			});
	
	new uploadPreview({
		UpBtn : "screenShotInput",
		ImgShow : "img_picture"
	});

	$("#img_picture").click(function() {
		$("#screenShot").click();
	});
});

</script>
</html>